﻿using Microsoft.VisualStudio.TestTools.UnitTesting;
using AMatysiak.Methods;
using System;

namespace AMatysiakTest.Methods
{
    [TestClass]
    public class IsValidPostalCodeTest
    {
        [TestMethod]
        public void checkValidCode()
        {
            string code = "62-080";
            bool result = code.IsValidPostalCode();

            Assert.IsTrue(result);
        }

        [TestMethod]
        public void checkInValidCode()
        {
            string code = "62080";
            bool result = code.IsValidPostalCode();

            Assert.IsFalse(result);
        }

        [TestMethod]
        public void checkSixDigitsCode()
        {
            string code = "622-080";
            bool result = code.IsValidPostalCode();

            Assert.IsFalse(result);
        }
    }
}
